#ifndef _EKOS_IPS_H_
#define _EKOS_IPS_H_

struct mutex_t
{
	 /* 状态 spinlock 锁 */
	 uint8_t lock;
	 /* 当前进程 */
	 uint16_t cur;
	 /* 等待队列 */
	 uint16_t sleep;
} __attribute__ ((aligned (2)));


struct semaphore_t
{
	 /* 状态 spinlock 锁 */
	 uint8_t lock;
	 /* 当前计数 */
	 uint16_t count;
	 /* 等待队列 */
	 uint16_t sleep;
} __attribute__ ((aligned (2)));

#define MAX_SEM_COUNT ((uint16_t)0xffff)

#endif /* _EKOS_IPS_H_ */
